package ooday02zy1;

public class Doctor extends Person{
    String title;
    Doctor(String name,int old,String address,String title){
        super(name,old,address);
        this.title=title;
    }
    void cut(){
        System.out.println("我叫"+name+"，我在做手术");
    }
    void sayHi() {
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..."+"我是"+title+"医生");
    }











    /*
    String title;
    Doctor(String name,int old,String address,String title){
        super(name,old,address);
        this.title=title;
    }
    void cut(){
        System.out.println("我叫"+name+"，我在做手术");
    }
    void sayHi() {
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..."+"我是"+title+"医生");
    }

     */
}
